# addTest方法的使用
import unittest
import Test001
import Test002
# def createSuite():
#     suite = unittest.TestSuite()
#     suite.addTest(Test001.testCase1("test_baidu1"))
#     suite.addTest(Test001.testCase1("test_baidu2"))
#     suite.addTest(Test002.testCase2("test_baidu1"))
#     suite.addTest(Test002.testCase2("test_baidu2"))
#     return suite
# if __name__=="__main__":
#     suite=createSuite()
#     runner=unittest.TextTestRunner()
#     runner.run(suite)



# 另种写法
#def createSuite():
suite = unittest.TestSuite()
suite.addTest(Test001.testCase1("test_baidu1"))
suite.addTest(Test001.testCase1("test_baidu2"))
suite.addTest(Test002.testCase2("test_baidu1"))
suite.addTest(Test002.testCase2("test_baidu2"))
    #return suite
#if __name__=="__main__":
#suite=createSuite()
runner=unittest.TextTestRunner()
runner.run(suite)